package gen.core.models;

import java.util.Properties;

/**
 * 数据库连接配置。
 *  
 * @author nswish
 */
public class ConnConfig {
	private String id;
	private String name;
	private String description;
	private String catagory;
	private String driver;
	private String url;
	private String user;
	private String password;
	private String owner;
	private String createTime;
	private String modifiedTime;
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public String getCatagory() {
		return catagory;
	}
	public void setCatagory(String catagory) {
		this.catagory = catagory;
	}
	public String getDriver() {
		return driver;
	}
	public void setDriver(String driver) {
		this.driver = driver;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public String getUser() {
		return user;
	}
	public void setUser(String user) {
		this.user = user;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getOwner() {
		return owner;
	}
	public void setOwner(String owner) {
		this.owner = owner;
	}
	public String getCreateTime() {
		return createTime;
	}
	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}
	public String getModifiedTime() {
		return modifiedTime;
	}
	public void setModifiedTime(String modifiedTime) {
		this.modifiedTime = modifiedTime;
	}
	public String toString(){
		return this.name;
	}
	
	public Properties toProperties(){
		Properties aProperties = new Properties();
		aProperties.setProperty("driver", getDriver());
		aProperties.setProperty("url", getUrl());
		aProperties.setProperty("user", getUser());
		aProperties.setProperty("password", getPassword());
		return aProperties;
	}
}